package com.imooc.sell.service;

import com.imooc.sell.dataobject.OrderDetail;
import com.imooc.sell.dataobject.OrderMaster;
import com.imooc.sell.dto.OrderDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface OrderService {

  /**
   * 创建订单
   */

  OrderDTO create(OrderDTO orderDTO);

  /**
   * 查询所有订单
   */
  Page<OrderMaster> findAll(Pageable pageable);

  /**
   * 查询单个订单
   */

  OrderDTO findOne(String orderId);

  /**
   * 查询某个人的订单列表
   **/

  Page<OrderDTO> findList(String buyerOpenId, Pageable pageable);

  /**
   * 取消订单
   **/

  OrderDTO cancel(OrderDTO orderDTO);

  /**
   * 完结订单
   **/

  OrderDTO finish(OrderDTO orderDTO);

  /**
   * 支付订单
   **/

  OrderDTO pay(OrderDTO orderDTO);

}
